<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="../../../static/third/editormd/css/editormd.css" th:href="@{/third/editormd/css/editormd.css}">
    <!--<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">-->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
</head>
<body>

<div class="container">
    <h1 th:text="${article.title}"></h1>
    <div id="editormd"  >
        <textarea style="display:none;"      th:text="${article.content}"></textarea>
    </div>
    <a href="" th:href="@{/}" class="layui-btn">主菜单</a>
</div>


<script
        src="https://code.jquery.com/jquery-3.3.1.js"
        integrity="sha256-2Kok7MbOyxpgUVvAk/HJ2jigOSYS2auK4Pfzbm7uH60="
        crossorigin="anonymous"></script>
<script th:src="@{/third/editormd/lib/marked.min.js}"></script>
<script th:src="@{/third/editormd/lib/prettify.min.js}"></script>
<script   th:src="@{/third/editormd/editormd.min.js}"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script type="text/javascript">
    $(function() {
        editormd.markdownToHTML("editormd", {//注意：这里是上面DIV的id
            htmlDecode : "style,script,iframe",
            emoji : true,
            theme : "dark",
            previewTheme : "dark",
            editorTheme : "pastel-on-dark",
            taskList : true,
            tocm : true,
            tex : true, // 默认不解析
            codeFold : true
        });

        // editormd({
        //     path:"/third/edtiormd/lib/",
        //     theme : "dark",
        //     previewTheme : "dark",
        //     editorTheme : "pastel-on-dark",
        // });
        // editormd.markdownToHTML("editormd");

    });
</script>
</body>
</html>